package com.gxpt.app;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.gxpt.app.view.Activity_assess_life;
import com.gxpt.app.view.Activity_home;
import com.gxpt.app.view.Activity_pay_show_life;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

@ContentView(R.layout.test)
public class Test extends Activity {

    @ViewInject(R.id.button1)
    Button button1;

    @ViewInject(R.id.button2)
    Button button2;

    @ViewInject(R.id.button3)
    Button button3;

    @ViewInject(R.id.button4)
    Button button4;

    @ViewInject(R.id.button5)
    Button button5;


    Context context;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
        context = this;


//        finish();
//        Intent go = new Intent();
//        go.setClass(context,Activity_home.class);
//        startActivity(go);
    }

    @Event(value={R.id.button1,R.id.button2,R.id.button3,R.id.button4,R.id.button5})
    private void getEvent(View view){
        Intent go = new Intent();
        switch(view.getId()){

            case R.id.button1:
                go.setClass(context,Activity_home.class);
                startActivity(go);
                break;
            case R.id.button2:
//                go.setClass(context,Activity_pay_life.class);
//                startActivity(go);
                break;
            case R.id.button3:
                go.setClass(context,Activity_pay_show_life.class);
                startActivity(go);
                break;
            case R.id.button4:
                go.setClass(context,Activity_assess_life.class);
                startActivity(go);
                break;
            case R.id.button5:
                go.setClass(context,Activity_assess_life.class);
                startActivity(go);
                break;
        }
    }
}
